// src/stores/useStore.js
import { defineStore } from 'pinia';

export const useStore = defineStore('main', {
	state: () => ({
		msg: '我是 pinia',
		userInfo: {},
	}),
	getters: {
		getUserMsg: (state) => {
			return state.msg;
		}
	},
	actions: {
		setUserInfo(info) {
			this.userInfo = info; // 更新用户信息
		}
	}
});
